// C source file

#include <stdio.h>



int sum(int a, int b) 
{
   return a + b;
}

int main() 
{
    //typedef 声明一个函数指针类型
    typedef int func_t(int a, int b);
    func_t *fp = sum;
    int res1 = fp(1,2);
    printf("res %d\n", res1);

    typedef int (*func_ptr)(int a, int b);
    func_ptr fptr = sum;
    int res2 = fptr(1,2);
    printf("res %d\n", res2);
    return 0;
}
